Issue archive copied from GitLab.com issue list



2021-02-09
Title: RFC - example suggestion
From: Queuenard
	Goal: change Blockland to not print anything to the console. Why? Because why not?

	Research: printf (namespace Con) is at 0x437bc0. We can block this function by hooking that function and not calling the original. Warnings and errors will still print, so what else needs to be done?



2021-02-09
Title: RFC - Increase precision of scientific notation when casting numbers to strings
From: S. Sze
	Goal: Increase precision when casting numbers to string and vice versa to preserve more than 6 significant figures. Maybe 16? When casting from string to number, cast numbers without a decimal point as ints to preserve behavior when checking for perfect equality between numbers.

From: Queuenard
	Doesn't seem difficult to implement a Torque-facing function to convert float to string just by using default C++ behavior.
	
From: S. Sze
	The issue is not converting it manually, the issue is the engine's internal auto conversion. IIRC Port identified the "bug" to be the printf format method when casting number values to string - Port mentioned it is 'g' in the source, but that simply changing it to 'f' for example caused some other obscure bugs to pop up.
	http://www.cplusplus.com/reference/cstdio/printf/

From: S. Sze
	Noted this portion of the documentation, which suggests the simple solution could be simply adding in this value after the 'g' specifier
	.precision	description
	.number	For integer specifiers (d, i, o, u, x, X): precision specifies the minimum number of digits to be written. If the value to be written is shorter than this number, the result is padded with leading zeros. The value is not truncated even if the result is longer. A precision of 0 means that no character is written for the value 0.For a, A, e, E, f and F specifiers: this is the number of digits to be printed after the decimal point (by default, this is 6).**For g and G specifiers: This is the maximum number of significant digits to be printed.**For s: this is the maximum number of characters to be printed. By default all characters are printed until the ending null character is encountered.If the period is specified without an explicit value for precision, 0 is assumed.

From: Queuenard
	https://gitlab.com/Eagle517/float-precision
	This should fix it. This changes float precision from 6 to 16.



2021-02-09
Title: RFC - Fix modulo arithmetic when used on negative numbers
From: S. Sze
	Goal: Fix behavior when running modulo operator on negative numbers. Current behavior: negative numbers modulo by odd numbers results in incorrect values. Ex: -1 % 3 == 1 when it should be -1 % 3 == 2

From: Queuenard
	Would a simple function be sufficient? Example:
	modulo(-1, 3)
	
From: S. Sze
	It's to fix expected behavior - it's easy enough to write a working modulo function. If it's too much hassle to fix it as part of the DLL, its not really necessary to fix.



2021-02-09
Title: RFC - Add ability to configure how bricks are decided to be ghosted to clients
From: S. Sze
	Current automatic ghosting behavior runs a 2000 TU radius search around the client's current control object every few seconds IIRC to find bricks to ghost to a client. In addition, new bricks trigger ghosting wherever they are planted, even if far away outside of ghosting range of the client.
	Goal: Improve this behavior to reduce the impact on the server whenever many clients are on, and possibly allow configuration via console functions (ex: changes to ghost radius and frequency of search, disable autoghosting of new bricks outside of ghost range)

From: Queuenard
	> In addition, new bricks trigger ghosting wherever they are planted, even if far away outside of ghosting range of the client.
	I just investigated this issue last week. When many new bricks are created, the game ends up sending empty packets (something like 21 bytes) to all clients and the server enters "fast packet mode", (I'm unsure of the extent of this) whether or not clients are close enough to ghost the bricks. I'm not sure if simply omitting these packets would work -- sequence numbers may be a problem here.
	The ghosting distance should be flexible depending on the server's draw distance. Do you know how environment zones affect individual clients' ghosting ranges?

From: S. Sze
	Environment zones do not affect ghosting ranges at all, I'm pretty sure. The easiest way to test is to spam duplications out in the distance while on a dedicated server. Given that all environment zones do is just ghost different environment objects to the client, I severely doubt it would affect brick ghosting behavior in the slightest.
	Probably the best way to handle it is just a maximum ghost radius of 2.5k TU as the maximum draw distance is 2k, IIRC.
	
From: Queuenard
	This does some of the things you requested: https://notabug.org/Queuenard/GhostBuddy
	It disables ghosting and you can feed any SimSet full of bricks and it will make a client ghost them. You can also manually trigger a brick scope query but not while ghosting is disabled.



2021-02-09
Title: RFC - Increase # of image and animation slots accessible via scripts
From: S. Sze
	Current behavior only allows mounting of images/playing of animations on 4 different slots, out of the 8? or 16? possible that the engine supports.
	Goal: Increase number of slots accessible to scripters, by 2 or 4. Check to see if this change requires the client to also run this DLL.

